<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: id
  Date: 2021/3/11
  Time: 8:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page  isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../util/makerAndenterGoodAndselect1.jsp"%>
<html>
<head>
    <title>Title</title>
    <style type="text/css">
        /*进货订单*/
        #center{
            width: 1288px;
            height:60px;
            position: absolute;
            top: 60px;
            left: 83px;

        }

        /*from表单*/
        .ctop{
            position: relative;
            left: 44px;
            top: 10px;
            border-radius: 10px;
            width: 1200px;
            height: 40px;
            box-sizing: border-box;
            padding-top: 5px;
            padding-left: 15px;
            border: 1px solid paleturquoise;
        }

        #tab{
            box-sizing: border-box;
            padding-left: 96px;
            width: 1288px;
            height: 300px;
            position: absolute;
            top: 115px;
            left: 2px;

        }
        .p{
            float: left;
            width: 55px;
            text-align: center;
            height: 40px;
        }
        .p:hover{
            background-color: rgb(192,192,192);
        }

    </style>
    <script type="text/javascript" src="../../../static/jquery-3.4.1.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#tab").hover(function () {
                $("#d4").hide()
                $("#xs").hide()
                $("#d3").hide()
                $("#d4").hide()
            })

        })
        /*接收操作*/
        function enter(id) {
            var url="${pageContext.request.contextPath}/over?id="+id;
            if(confirm("确定收到boss指令")){
                location.href=url;
                return true;
            }else {
                return  false;
            }
        }


        /*删除操作*/
        function delLack(id) {
            var url="${pageContext.request.contextPath}/delLack?id="+id;
            if(confirm("确定删除吗?")){
                location.href=url;
                return true;
            }else {
                return  false;
            }
        }

    </script>
        </head>
<body>
<!--************************************************************************************************************************-->
<!--查询的文本框上半部分-->
<div id="center">
    ${msg}
    <!--上面部分的查询-->
    <div class="ctop">
        <form action="${pageContext.request.contextPath}/findLackList">
            <!--根据订单编号查-->
            <input type="text" name="goodname3" placeholder="根据编号查询" style="width: 230px;border-radius: 6px;height: 1.7em;text-indent: 1em" value="${goodname3}">
            <input type="submit" value="搜索" style="width: 90px;height: 2em;background-color: rgb(64,158,244);border-radius: 6px">
            <c:if test="${sessionScope.boosUser!=null}">
                <button id="btn" style="width: 100px;height: 2em;border-radius: 7px;margin-left: 740px">
                    <a href="${pageContext.request.contextPath}/preAddLack">
                        ADD
                    </a>
                </button>
            </c:if>
        </form>
    </div>

    <%--表格展示部分--%>

    <div id="tab">
        <table style="width: 1100px;height: 180px;text-align: center" border="1" >
            <tr>
                <td>商品类型</td>
                <td>商品名称</td>
                <td>商品单价</td>
                <td>商品数量</td>
                <td>商品单位</td>
                <td>商品说明</td>
                <td>查看情况</td>
                <td>查看人员</td>
                <td>操作</td>



            </tr>
            <c:if test="${ not emptyrequestScope.page.list}">
                <c:forEach var="list" items="${requestScope.page.list}">
                    <tr>
                        <td>
                            <c:if test="${list.goosstyle3==1}">
                                电子类型
                            </c:if>
                            <c:if test="${list.goosstyle3==2}">
                                食物类型
                            </c:if>
                            <c:if test="${list.goosstyle3==3}">
                                生活类型
                            </c:if>
                        </td>


                        <td>
                            ${list.goodname3}
                        </td>


                        <td>
                            ${list.money3}
                        </td>
                        <td>${list.num3}</td>
                        <td>
                            ${list.danwei3}
                        </td>
                        <td>
                           ${list.content3}
                        </td>

                        <td>
                            <c:if test="${list.okandno3==0}">
                                <span style="color: red">未处理</span>
                            </c:if>
                            <c:if test="${list.okandno3==1}">
                                <span style="color: blueviolet">已处理</span>
                            </c:if>
                        </td>
                        <td>
                            ${list.yesandno}
                        </td>
                        <c:if test="${sessionScope.resUser!=null}">
                        <td>
                                <%--接收--%>
                                <a href="javascript:enter(${list.id})" title="收到">
                                    <img src="../../../static/img/update.png" alt="收到">
                                </a>
                        </td>
                        </c:if>

                        <c:if test="${sessionScope.boosUser!=null}">
                            <td>
                                    <%--删除--%>
                                <a href="javascript:delLack(${list.id})" title="删除">
                                    <img src="../../../static/img/delete.png" alt="删除">
                                </a>
                            </td>
                        </c:if>
                    </tr>
                </c:forEach>
            </c:if>
        </table>

        <%--page--%>
        <div id="pa" style="width: 500px;height: 50px;margin-top: 30px">
            <div class="p">
                <a href="${pageContext.request.contextPath}/findLackList?start=${page.curryPage-1}&goodname3=${goodname3}">上一页</a>
            </div>
            <c:forEach begin="1" end="${page.totalPae}" var="a">
                <div class="p">
                    <a href="${pageContext.request.contextPath}/findLackList?start=${a}&goodname3=${goodname3}">${a}</a>
                </div>
            </c:forEach>


            <div class="p">
                <a href="${pageContext.request.contextPath}/findLackList?start=${page.curryPage+1}&goodname3=${goodname3}">下一页</a>
            </div>

            <div class="p" style="width: 200px">
                <span>第${page.curryPage}/${page.totalPae}页</span>
                <span>共${page.totalCount}条记录,</span>
            </div>
        </div>
    </div>
</div>



</body>
</html>
